﻿using System;
using NHibernate;
using NHibernate.Cfg;
using NHibernate.Tool.hbm2ddl;
using NUnit.Framework;
using OurSite.Business.Category;
using OurSite.Business.Repositories;


namespace OurSite.Tests
{
    [TestFixture]
    public class CategoryBaseRepository_Fixture
    {
        Guid g = new Guid();

        [TestFixtureSetUp]
        public void TestFixtureSetUp()
        {
            NHibernateSessionManager.Instance.Initialize();
        }


        [Test]
        public void Can_get_Categories_that_are_parents()
        {
            ICategoryRepository repository = new CategoryRepository();
            var categories = repository.GetAllParentCategories();

            Assert.IsNotNull(categories);
            Assert.Greater(categories.Count, 0);
        }

    }
}
